package cn.edu.sig.service;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.edu.sig.bean.CurrentPage;
import cn.edu.sig.bean.History;
import cn.edu.sig.bean.User;
import cn.edu.sig.dao.HistoryDao;

@Service("historyService")
@Transactional
public class HistoryService {

	@Resource(name="historyDao")
	private HistoryDao historyDao;
	
	public void addHistory(History history){
		
		historyDao.add(history);
		
	}
	
	public CurrentPage<History> findAllByUser(User user,int pageNo, int pageSize){
		
		return historyDao.findAllByUser(user,pageNo, pageSize);
	}

}
